<template>
	<view class="content">
		<view id="top_box">
			<u-swiper :list="list" :effect3d="true" :title="false"></u-swiper>
			<!-- 		<u-notice-bar :close-icon="!true" :list="notice" type="success"></u-notice-bar> -->
			<view >
				<u-row gutter="16">
					<u-col span="6">
						<view class="btns">
							<u-button class="btn" type="warning" size="medium" @click="gother('/pages/joinst/joinst','社团报名表')">社团报名</u-button>
						</view>
					</u-col>
					<u-col span="6">
						<view class="btns">
							<u-button class="btn" type="warning" size="medium" @click="gother('/pages/joinorg/joinorg','组织简历')">组织报名</u-button>
						</view>
					</u-col>
				</u-row>
			</view>
		</view>
		<view id="bottom_box">
			<view class="act_list wrap" v-for="item in items" @click="goRetru(item.rid,item.name,item.classOne,item.id)">
				<u-row gutter="16">
					<u-col span="5">
						<view class="inf_img">
							<cover-image
								:src="item.indexImg||cardImg"
								mode="aspectFit" class="indexImg" title="22132"></cover-image>
						</view>
					</u-col>
					<u-col span="7">
						<view class="text_area u-line-1">
							<view id="inf_name" class="inf">
								<text style="font-size: 35rpx;font-weight: bold;">{{ item.name }}</text>
							</view>
							<view v-if="item.intro" id="inf_intro" class="inf u-line-1" role="presentation">{{item.intro}}</view>
						</view>
					</u-col>
				</u-row>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				list: [{
						image: 'https://hd.jxj777.top/usr/img/bj1.jpg',
						title: '昨夜星辰昨夜风，画楼西畔桂堂东'
					},
					{
						image: 'https://hd.jxj777.top/usr/img/bj2.jpg',
						title: '身无彩凤双飞翼，心有灵犀一点通'
					},
					{
						image: 'https://hd.jxj777.top/usr/img/bj4.jpg',
						title: '谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳'
					}
				],
				notice: ['招新活动将于11111111开始，做好准备'],
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500,
        cardImg: 'https://hd.jxj777.top/usr/img/bj5.jpg',
				items: [{
						name: '琴理工作室',
						indexImg: '',
						rid: '',
						intro: '琴理工作室是沈阳理工大学教务处旗下的学生开发团队.......',
						classOne: '组织',
						classTwo: '',
						hot: ''
					},
					{
						name: '琴理工作室',
						indexImg: '',
						rid: '',
						intro: '琴理工作室是沈阳理工大学教务处旗下的学生开发团队.......',
						classOne: '组织',
						classTwo: '',
						hot: ''
					},
					{
						name: '琴理工作室',
						indexImg: '',
						rid: '',
						intro: '琴理工作室是沈阳理工大学教务处旗下的学生开发团队.......',
						classOne: '组织',
						classTwo: '',
						hot: ''
					},
					
				],
				selected: '社团/组织',
				selectedCity: "不限",
			}
		},
		onLoad() {
			let that = this
			this.$request({
				method: 'GET',
				url: '/organization/allorgmsg',
				header: {
					'Content-Type': 'application/x-www-form-urlencoded'
				},
			}).then(res => {
				console.log(res.data)
				console.log(this)
				that.items = res.data
			}).catch(res => {
				console.log(res)
				// 失败后执行
				console.log('reserror')
			})
		},
		methods: {
			goRetru(rid, title, cl, id) {
			  console.log(id)
        if(cl!="社团"){
          uni.navigateTo({
            url: '/pages/recru/recru?id=' + rid + '&title=' + title + '&class=' + cl
          })
        }else{
          uni.navigateTo({
            url: '/pages/stReture/stReture?id=' + id + '&title=' + title + '&class=' + cl
          })
        }
			},
			gother(url,title){
				uni.navigateTo({
					url: url + '?title=' + title
				})
			},
		}
	}
</script>

<style>
	.content{
		
	}
	.content swiper {
		width: 750rpx;
		height: 470rpx;
		padding: 0;
	}

	.content swiper image {
		width: 100%;
		height: 100%;
	}

	.inf_img .text_area {
		display: inline-block;
	}

	.inf_img {
		height: 10vh;
		width: 20vh;
	}

	.act_list {
		height: 13vh;
		padding: 20rpx;
		border-radius: 20rpx;
		margin: 30rpx 15rpx;
		-webkit-box-shadow: 0px .5px 2px 1.5px #c8c8c8;
		-moz-box-shadow: 0px .5px 2px 1.5px #c8c8c8;
		box-shadow: 0px .5px 2px 1.5px #c8c8c8;
	}

	.btns {
    text-align: center;
	}
  
	.btn,button{
		margin-top: 20rpx;
	}
</style>
